import request from '@/utils/request'


// 查询根据楼栋获取楼层
export function getFloosByBulidingId(buildingId) {
  return request({
    url: '/park/floor/getFloosByBulidingId/' + buildingId,
    method: 'get',
  })
}

// 条件查询楼层
export function getFloorAll(query) {
  return request({
    url: '/park/floor/getFloorAll',
    method: 'get',
    params: query
  })
}

// 修改楼层回显数据
export function getFloorById(id) {
  return request({
    url: '/park/floor/getFloorById/' + id,
    method: 'get',
  })
}


// 删除楼层
export function deleteFloorByid(id) {
  return request({
    url: '/park/floor/deleteFloorByid/' + id,
    method: 'get',
  })
}

// 添加楼层
export function addFloor(form) {
  return request({
    url: '/park/floor/addFloor',
    method: 'post',
    data: form
  })
}

// 修改楼层
export function updateFloor(form) {
  return request({
    url: '/park/floor/updateFloor',
    method: 'put',
    data: form
  })
}

// 楼层编号判空
export function getFloorByNumber(number, bulidingId) {
  return request({
    url: '/park/floor/getFloorByNumber?number=' + number + "&bulidingId=" + bulidingId,
    method: 'get',
  })
}
